package com.yehangtech.designpattern.创建者_原型模式;

import com.yehangtech.designpattern.创建者_原型模式.entity.Father;
import com.yehangtech.designpattern.创建者_原型模式.entity.Student;

public class Main {
    public static void main(String[] args) throws CloneNotSupportedException {
        Student s1 = new Student();
        Father father = new Father();
        father.setName("郭德纲");
        father.setAge(33);
        s1.setName("岳云鹏");
        s1.setSex(true);
        s1.setAge(21);
        s1.setFather(father);

        System.out.println(s1);
        System.out.println(s1.hashCode());
        Student clone = (Student) s1.clone();
        System.out.println(clone);
        System.out.println(clone.hashCode());
    }
}
